<template>
  <div class="page-content">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[10, 20, 50, 100]"
      :page-size="10"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: "PageFooter",
  props: {
    total: Number,
    currentPage: Number,
  },
  methods: {
    handleCurrentChange(val) {
      this.$emit("changePageFn", { current: val });
    },
    handleSizeChange(val) {
      this.$emit("changePageFn", { size: val });
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.page-content {
  margin-top: 20px;
}
</style>
